<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="payingList.title"/></title>
    <meta name="heading" content="<fmt:message key='payingList.heading'/>"/>
    <meta name="menu" content="PayingListMenu"/>
</head>

<c:set var="buttons">
    <input type="button" style="margin-right: 5px"
        onclick="location.href='<c:url value="/admin/payingForm.html?method=Add&from=list"/>'"
        value="<fmt:message key="button.add"/>"/>

    <input type="button" onclick="location.href='<c:url value="/mainMenu.html"/>'"
        value="<fmt:message key="button.done"/>"/>
</c:set>

<c:out value="${buttons}" escapeXml="false" />

<div class="clear">
</div>
<div class="buttons" style="float:left;padding-right:15px;">

<form:form commandName="payingSearch" method="post" action="payingList.html">
	<fieldset style="width: 125%;">
		<legend>
			<fmt:message key="paying.searchForm" />
		</legend>
		<table>
			<tr>
				<td><appfuse:label styleClass="desc" key="paying.txtSearch"/></td>
				<td><form:input path="name" /></td>
			</tr>
		</table>
		<button type="button" class="negative" id="searchForm_button_reset"  onclick="resetFields();">
			<fmt:message key="button.reset" />
		</button>
		<button type="submit" class="searchb" id="searchForm_button_search" name="search">
			<fmt:message key="button.search" />
		</button>
	</fieldset>
</form:form>
</div>
<div class="clear">
</div>

<display:table name="payingList" cellspacing="0" cellpadding="0" defaultsort="1" id="payingData" pagesize="2" class="table" export="true" style="width: 125%;">
    <display:column property="code" sortable="true" escapeXml="true" titleKey="payingData.code" style="width: 30%" 
    url="/admin/payingForm.html?from=list" paramId="id" paramProperty="id"/>
	<display:column property="name" sortable="true" titleKey="payingData.name" style="width: 30%"/>
    
    <display:setProperty name="paging.banner.item_name" value="payingData"/>
    <display:setProperty name="paging.banner.items_name" value="payingList"/>

    <display:setProperty name="export.excel.filename" value="Paying List.xls"/>
    <display:setProperty name="export.csv.filename" value="Paying List.csv"/>
    <display:setProperty name="export.pdf.filename" value="Paying List.pdf"/>
</display:table>

<c:out value="${buttons}" escapeXml="false" />

<script type="text/javascript">
    highlightTableRows("payingData");
</script>
